<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<html>
<head>
<title>Check-In Counter</title>
</head>

<body>
	<h2>Check-in Counter: Boarding Passes</h2>
    
    <c:forEach var="boardingPass" items="${boardingPasses}" varStatus="rowCounter">
	<h4>Boarding Pass</h4>
	
    <table width="882" border="1">
	      <tr>
		    <td width="110"><b>First Name:</b></td>
		    <td width="175">${passenger.firstName}</td>
	        <td width="105">From Airport:</td>
	        <td width="121">${flightRoutes[rowCounter.count-1].fromAirport}</td>
	        <td width="98">Seat:</td>
	        <td width="233">${boardingPasses[rowCounter.count-1].seatNumber}</td>
        </tr>
		  <tr>
		    <td>Last Name:</td>
		    <td>${passenger.lastName}</td>
	        <td>To Airport:</td>
	        <td>${flightRoutes[rowCounter.count-1].toAirport}</td>
	        <td>Baggage ID:</td>
	        <td>${baggage.idBaggage}</td>
	      </tr>
		  <tr>
		    <td>Passport:</td>
		    <td>${passenger.passport}</td>
		    <td>&nbsp;</td>
		    <td>&nbsp;</td>
		    <td>&nbsp;</td>
		    <td>&nbsp;</td>
      </tr>
		  <tr>
		    <td colspan="6">&nbsp;</td>
      </tr>
		  <tr>
		    <td>Departure time:</td>
		    <td>${flights[rowCounter.count-1].departureTime}</td>
	        <td>Terminal:</td>
	        <td>${boardingPasses[rowCounter.count-1].terminal}</td>
	        <td>Gate:</td>
	        <td>${boardingPasses[rowCounter.count-1].gate}</td>
	      </tr>
	</table>
	</c:forEach>


</body>
</html>